package com.zcheng.uc.rest;

import com.zcheng.common.rest.BaseController;
import com.zcheng.uc.biz.BaseUserBiz;
import com.zcheng.uc.entity.BaseUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by ace on 2017/9/6.
 */
@RestController
@RequestMapping("user")
public class UserRest extends BaseController<BaseUserBiz,BaseUser> {
    @Value("${language.en:您好，世界}")
    private String hello;

    @Autowired
    private BaseUserBiz baseUserBiz;

    @RequestMapping("/hello")
    public String test(@PathVariable String id){

        return hello;
    }

    @RequestMapping("/{id}")
    public BaseUser get(@PathVariable Integer id){

        return baseUserBiz.selectById(id);
    }
}
